Functions and Statements

ProModel uses several functions and statements specifically for off-shift and break logic: SKIP, PRIORITY, DTLEFT(), FORLOCATION(), -FORRESOURCE(), and RESOURCE(). Following is a brief description of each. For more details, see Statements and Functions.

SKIP If used in pre-start logic, it causes the off-shift or break time (including any off-shift or break logic) to be skipped so that the location or resource never goes off line. If used in the off-shift or break logic, it causes the off-line time defined in the shift file to be skipped. This allows you to specify a WAIT statement for the off-line time and then SKIP the off-line time defined in the shift file.

PRIORITY This statement provides an alternative way to specify off-shift or break priorities. It also allows the priority to be changed after some time being off-shift or on break. If the priority is changed to a value lower than the current value, the system will check if any preemption may occur at that time. This statement is not allowed in pre-off shift or pre-break logic.

DTLEFT() This function returns the remaining off-shift time based on when the location or resource is scheduled to go back on shift as defined in the shift file. It may be used in off-shift and break logic to adjust the actual time that the location or resource is off-line.

FORLOCATION() This function returns TRUE if the member for which the shift or break logic being executed is a location. This may be fol0lowed by a test using the LOCATION() function to determine the precise location.

FORRESOURCE() This function returns TRUE if the member for which the shift or break logic being executed is a resource. The RESOURCE() function may then be used to determine the precise resource if multiple resources are listed as members.

RESOURCE() This returns the name-index number of the resource currently processing the off-shift or break logic.

In addition to these functions, the LOCATION() and DTDELAY() functions are particularly useful when defining off-shift and break logic.